<?xml version="1.0" encoding="UTF-8" ?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/general.xhtml">
                
                
	<ui:define name="title"><h:outputText value="Sign In"/></ui:define>
	<ui:define name="header"><h1><h:outputText value="Please Sign In"/></h1></ui:define>
	
	
	<ui:define name="content">
				
		<h:form id="loginForm">
			<p:fieldset styleClass="fieldset" legend="Authentification Form">
				
				<p:focus/>
				
				
				<p:messages id="messages" globalOnly="true"></p:messages>
					
				<h:panelGrid id="loginPanelGrid" cellspacing="8" columns="3">
				
					
					<h:panelGroup>
						<h:outputLabel value="#{Message['label.username']} :"></h:outputLabel>
						<h:outputText style="color:red;" value="*"></h:outputText>
					</h:panelGroup>
					
					<p:inputText id="userName" required="true" value="#{user.userName}" label="#{Message['label.username']}" title="Enter your user name"></p:inputText>
					<h:panelGroup>
						<p:message id="userNameMsg" for="userName"></p:message>
						<p:tooltip for="userName" styleClass="tooltip" showEvent="focus" hideEvent="blur"></p:tooltip>
					</h:panelGroup>
				
					<h:panelGroup>
						<h:outputLabel value="#{Message['label.password']} :"></h:outputLabel>
						<h:outputText style="color:red" value="*"></h:outputText>
					</h:panelGroup>
					<p:password id="password" required="true" value="#{user.password}" label="#{Message['label.password']}" title="Please enter a password"></p:password>
					<h:panelGroup>
						<p:message id="passwordMsg" for="password"></p:message>
						<p:tooltip for="password" styleClass="tooltip" showEvent="focus" hideEvent="blur"></p:tooltip>
					</h:panelGroup>
				
					<p:commandButton id="submitButton" action="confirmSignIn" update="loginPanelGrid, messages" icon="ui-icon-check" value="#{Message['button.login']}"></p:commandButton>
					<p:commandButton  id="newUserButton" action="newUser" immediate="true" ajax="false" icon="ui-icon-plus" value="#{Message['button.signup']}"></p:commandButton>
				</h:panelGrid>
			</p:fieldset>
		</h:form>

	</ui:define>
                
                
</ui:composition>
